<template>
    <div style="height:30px">
        <span v-for="(item,index) in data" :key="index" class="topmenu" @click="goToPage(item.url)" >{{item.name}}</span>
    </div>

    
</template>
<script lang="ts" setup>
import { defineProps } from 'vue'
import { useRouter } from 'vue-router';
const props = defineProps({
    data:[{
        name:String,
        url:String
    }],
    
});

const router = useRouter()

const goToPage = (param) => {
  router.push({ path: param });
};




</script>
<style scoped lang="less">
.topmenu{
    font-size: 14px;
    color: #fff;
    padding-left:30px;
    cursor: pointer;
}

</style>